[NativeAOT] fix NAOT mappings (follow-up to https://github.com/dotnet/runtime/pull/123333)#123831
Conversation
|
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib |
There was a problem hiding this comment.
Pull request overview
This PR refines NativeAOT’s IL-to-native sequence point mapping to close gaps found after #123333, ensuring more accurate source line attribution in stack traces, especially for runtime-async scenarios described in #122722.
Changes:
- Extend propagation of the last known document/line info across the entire temporary
sequencePointsbuffer so IL offsets beyond the last explicit sequence point still get a valid document/line mapping. - Replace the per-iteration
previousIlOffsettracking with amaxIlOffsettracker and adjust the emission condition so sequence points are produced both when backed by PDB info and whenever the IL offset falls within or below the maximum IL offset seen so far, fixing cases where IL offsets re-enter earlier ranges.
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Outdated
Show resolved
Hide resolved
jkotas
left a comment
There was a problem hiding this comment.
LGTM!
@MichalStrehovsky Could you please take a look as well?
...reclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/StackTraceLineNumbersNode.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
…lysis/MethodCodeNode.cs Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/DependencyAnalysis/MethodCodeNode.cs
Show resolved
Hide resolved
|
Hm, I have requested the pipeline be rerun but it is still “neutral” on many runs. |
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was an infra outage earlier today, the system may be still recovering from it. |
|
/ba-g timeouts |
Testing on #122722 revealed some issues with #123333 so I am fixing these here.
After #123333 there remain two error cases:
This fixes both of these issues.
Before:


After:


foo.txt
foo2.txt
New Compressed (zipped) Folder.zip